package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.MerchantMapper;
import org.shop.entity.Merchant;
import org.shop.service.MerchantService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MerchantServiceImpl extends BaseServiceImpl<Merchant, Long> implements MerchantService {

	@Autowired
	private MerchantMapper merchantMapper;
	
	
	@Override
	public Map<String, Object> getCheckOfShopList(Map<String, Object> paramMap) {
		 List<Map<String, Object>> mapList = merchantMapper.getCheckOfShopList(paramMap);
	        Integer count = merchantMapper.getCheckOfShopCount(paramMap);
	        //分页数据
	        Map<String, Object> dataMap = new HashMap<String, Object>();
	        dataMap.put("total", count);
	        dataMap.put("rows", mapList);
	        return dataMap;
	}
	@Override
	public Map<String, Object> getAllShopList(Map<String, Object> paramMap) {
		 List<Map<String, Object>> mapList = merchantMapper.getAllShopList(paramMap);
	        Integer count = merchantMapper.getAllShopCount(paramMap);
	        //分页数据
	        Map<String, Object> dataMap = new HashMap<String, Object>();
	        dataMap.put("total", count);
	        dataMap.put("rows", mapList);
	        return dataMap;
	}
	@Override
	public List<Merchant> getAllMerchantInfo() {
		return merchantMapper.getAllMerchantInfo();
	}
	@Override
	public Merchant getMerchantInfo(Map<String, Object> paramMap) {
		return merchantMapper.getMerchantInfo(paramMap);
	}
	@Override
	public int verifyMerchantName(Map<String, Object> paramMap) {
		return merchantMapper.verifyMerchantName(paramMap);
	}
	
}
